<!DOCTYPE HTML>
<html>
<head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" href="/static/bootstrap/css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="/static/plugins/layui/css/layui.css"/>
    <link rel="stylesheet" href="/static/plugins/PNotify/pnotify.custom.min.css">
    <style type="text/css">
        html{
            height: 100%;
        }
        body{
            background: #EFF3FC;
            height: 100%;
        }
        .content {
            margin-left: 0;
            margin-top: 0;
            width: auto;
            padding: 0px 20px 0 20px;
            height: 97%;
        }
        table{
            width: 90%;
            margin: 0 auto;
        }
        tr{
            /*height: 30px;*/
            text-align: center;
        }
        .table tbody > tr > td{
            border-top: 0px;
        }
        tr:first-child{
            text-align: center;
        }
        tr th{
            text-align: center;
        }

        button, input {
            line-height: normal;
        }
        .shareTable{
            background: #ffffff;
            border-radius: 10px;
            border: 1px solid #cccccc;
            height: 93%;
        }
        .shareTable table{
            width:95%;
            margin: 0 auto;
            margin-top: 22px;
        }
        .shareTable .tabelSty{
            height:87%;
        }
        #demo7{
            margin-left: 3%;
            border-top: 1px solid #eeeeee;
        }
        .table thead > tr > th, .table tbody > tr > th, .table tfoot > tr > th, .table thead > tr > td, .table tbody > tr > td, .table tfoot > tr > td{
            vertical-align: middle;
        }
        tr{
            height: 45px;
        }
    </style>
</head>
<body ng-app="shareWith" ng-controller="shareWithCtrl">
<div class="content">
    <div style="padding: 19px 0;">收集管理>我的分享</div>
    <div class="shareTable">
        <div class="tabelSty">
            <table class="col-sm-12 table table-striped tabList">
                <thead >
                <tr>
                    <th width="2%"></th>
                    <th width="11%">标题</th>
                    <th width="9%">大小</th>
                    <th width="11%">分享时间</th>
                    <th width="12%">分享人</th>
                    <th width="7%">操作</th>
                </tr>
                </thead>
                <tbody>
                 <tr ng-repeat="item in dataList1">
                    <td><input type="checkbox"></td>
                    <td ng-bind="item.title"></td>
                    <td ng-bind="item.size"></td>
                    <td ng-bind="item.share_time"></td>
                    <td ng-bind="item.share_from"></td>
                    <td class="pointer" title="操作" style="position: relative;text-align: left">
                        <span style="color:#49cff6;" ng-click="showOperation(item.id)"><i class="fa fa-hand-paper-o icon"></i></span>
{#                        ng-show="optionTypeShow == item.id"#}
                        <div class="optionType">
                            <ul>
                                <li ng-click="downLoad()">下载</li>
                                <li ng-click="cancelShare(item.id,item.name)">分享</li>
                                <li ng-click="rename()">取消分享</li>
                            </ul>
                        </div>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
        <div id="demo7" class="pag"></div>
    </div>
</div>
<script type="text/javascript" src="/static/assets/js/jquery-1.8.1.min.js"></script>
<script type="text/javascript" src="/static/assets/js/bui-min.js"></script>
<script type="text/javascript" src="/static/datepicker/js/moment.min.js" ></script>
<script type="text/javascript" src="/static/plugins/angular/angular.min.js" ></script>
<script type="text/javascript" src="/static/assets/js/config-min.js"></script>
<script type="text/javascript" src="/static/plugins/layui/js/layui.js"></script>
<script type="text/javascript" src="/static/plugins/PNotify/pnotify.custom.min.js"></script>
<script type="text/javascript" src="/static/plugins/pnotify.js"></script>

<script type="text/javascript">
    var app = angular.module('shareWith', ['soc.PNotify']);
    app.controller('shareWithCtrl', function ($scope,$http,$rootScope,serPNotify) {
        console.log("1111");
        $rootScope.shareWithList = function () {
            $http({
                url: '/api/share/sharewith',
                method: "POST",
                data: {}
            }).then(function (resp) {
                console.log("resp",resp);
                $scope.dataList = resp.data.data.totalDoc;
                //分页
                layui.use(['laypage', 'layer'], function () {
                    var laypage = layui.laypage
                        , layer = layui.layer;
                    laypage.render({
                        elem: 'demo7'
                        , count: $scope.dataList.length
                        , layout: ['count', 'prev', 'page', 'next', 'limit', 'skip']
                        , jump: function (obj) {
                            //obj.curr得到当前页，以便向服务端请求对应页的数据。
                            //obj.limit得到每页显示的条数
                            $scope.dataList1 = $scope.dataList.slice((obj.curr - 1) * obj.limit, obj.curr * obj.limit);
                            $scope.$applyAsync();
                        }
                    });
                })
            },function (err) {
                serPNotify.error("接口请求失败");
            });
        };
        $rootScope.shareWithList();
{#        $scope.dataList=[{#}
{#            "id":"合同档案",#}
{#            "type":"10",#}
{#            "status":"100Mb",#}
{#            "aaa":"admin",#}
{#            "user":"2019",#}
{#            "juese":"办公室",#}
{#            "time":"内部",#}
{#            "ip":"待归档",#}
{#            "scription":"10y月之后归档",#}
{#            "operation":"1",#}
{#        },{#}
{#            "id":"合同档案",#}
{#            "type":"10",#}
{#            "status":"100Mb",#}
{#            "aaa":"admin",#}
{#            "user":"2019",#}
{#            "juese":"办公室",#}
{#            "time":"内部",#}
{#            "ip":"待归档",#}
{#            "scription":"10y月之后归档",#}
{#            "operation":"1",#}
{#        },{#}
{#            "id":"合同档案",#}
{#            "type":"10",#}
{#            "status":"100Mb",#}
{#            "aaa":"admin",#}
{#            "user":"2019",#}
{#            "juese":"办公室",#}
{#            "time":"内部",#}
{#            "ip":"待归档",#}
{#            "scription":"10y月之后归档",#}
{#            "operation":"1",#}
{#        },{#}
{#            "id":"合同档案",#}
{#            "type":"10",#}
{#            "status":"100Mb",#}
{#            "aaa":"admin",#}
{#            "user":"2019",#}
{#            "juese":"办公室",#}
{#            "time":"内部",#}
{#            "ip":"待归档",#}
{#            "scription":"10y月之后归档",#}
{#            "operation":"1",#}
{#        },{#}
{#            "id":"合同档案",#}
{#            "type":"10",#}
{#            "status":"100Mb",#}
{#            "aaa":"admin",#}
{#            "user":"2019",#}
{#            "juese":"办公室",#}
{#            "time":"内部",#}
{#            "ip":"待归档",#}
{#            "scription":"10y月之后归档",#}
{#            "operation":"1",#}
{#        }]#}
        //分页
{#        layui.use(['laypage', 'layer'], function () {#}
{#            var laypage = layui.laypage#}
{#                , layer = layui.layer;#}
{##}
{#            laypage.render({#}
{#                elem: 'demo7'#}
{#                , count: $scope.dataList.length#}
{#                , layout: ['count', 'prev', 'page', 'next', 'limit', 'skip']#}
{#                , jump: function (obj) {#}
{#                    //obj.curr得到当前页，以便向服务端请求对应页的数据。#}
{#                    //obj.limit得到每页显示的条数#}
{#                    $scope.dataList1 = $scope.dataList.slice((obj.curr - 1) * obj.limit, obj.curr * obj.limit);#}
{#                    $scope.$digest();#}
{#                }#}
{#            });#}
{#        })#}
    })

</script>
</body>
</html>